package com.bwie.controller;
import com.bwie.domain.Discount;
import com.bwie.service.DiscountService;
import com.bwie.service.impl.DiscountServiceImpl;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (tb_discount)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/discount")
public class DiscountController {
/**
* 服务对象
*/
    @Autowired
    private DiscountService discountService;

    @PostMapping("/listAll")
    public R listAll(@RequestBody PageInfoVo pageInfoVo){
        return discountService.listAll(pageInfoVo);
    }
    @PostMapping("addDicCount")
    public R addDicCount(@RequestBody Discount discount){
        return discountService.addDicCount(discount);
    }

}
